package asia.kalin.controller;

import asia.kalin.domain.ao.Result;
import asia.kalin.service.IDepartmentService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: Kalin
 * @Name：DepartmentController
 * @Date: 2025/3/24
 * @description
 */

@RestController
@RequestMapping("/department")
@RequiredArgsConstructor
public class DepartmentController {

    private final IDepartmentService departmentService;

    /**
     * 查询当前用户部门相关人员
     * @return Result
     */
    @GetMapping("/queryRelevantPersonnel")
    public Result queryRelevantPersonnel(){
        return departmentService.getDepartmentPersonnelById();
    }

    /**
     * 查询所有部门的负责人信息
     * @return Result
     */
    @GetMapping("/queryManager")
    public Result queryManager(){
        return departmentService.getDepartmentManagerAll();
    }

}
